package strategy;

/**
 * @ClassName : handlerFunction
 * @Description :
 * @Author : gyh
 * @Date: 2022-01-07 00:18
 */
public class handlerFunction implements Runnable {

    @Override
    public void run() {
        this.go();
    }

    private void go() {
        for (int i = 0; i < 10000; i++) {
            printMsg();
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

    public static void printMsg() {
        System.out.println(System.currentTimeMillis() + "线程：" + Thread.currentThread().getName());
    }
}
